<?php

namespace Common\Service;

Class PostsService extends BaseService
{

    protected $pk           = '_id';
    protected $_idType      =  self::TYPE_OBJECT;
    protected $autoinc      =  false;


    public function getFloor($threads_id)
    {
        $res = $this->where(['threads_id' => $threads_id])->order('floor desc')->limit(1)->select();
        $res = array_values($res)[0];
        return $res ? $res['floor'] : 0;
    }
   
}